package com.mes.service.tdd;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.mes.dao.tdd.SupplierMapper;
import com.mes.entity.tdd.Supplier;
import com.mes.entity.tdd.tj.Tpage;
/**
 * 
 *@ClassName: SupplierServiceImpl 
 *@Description: 供应商
 *@Author tdd
 *@Date 2018-6-6 上午10:38:38 
 *@version 1.0
 */
@Service
@Transactional
public class SupplierServiceImpl implements SupplierService{
	//注入供应商Mapper
	@Resource SupplierMapper supplierMapper;
	/**
	 * 供应商分页
	 */
	@Override
	public List<Supplier> list(Tpage pageBean) {
		return supplierMapper.list(pageBean);
	}
	/**
	 * 供应商条数
	 */
	@Override
	public int total(Tpage pageBean) {
		return supplierMapper.total(pageBean);
	}
	/**
	 * 供应商
	 */
	@Override
	public List<Supplier> all(Tpage pageBean) {
		return supplierMapper.all(pageBean);
	}
	/**
	 * 供应商添加
	 */
	@Override
	public Long add(Supplier supplier) {
		Long add = supplierMapper.add(supplier);
		return add;
	}
	/**
	 * 供应商修改
	 */
	@Override
	public int updata(Supplier supplier) {
		return supplierMapper.edit(supplier);
	}
	/**
	 * 供应商删除
	 */
	@Override
	public int updatadelete(Supplier supplier) {
		return supplierMapper.delete(supplier);
	}

}
